package org.fuyd.designpattern.singleton;

/**
 * 懒汉模式，在多线程下，不能正常工作（线程不安全）
 * Created by Jason on 2015/10/22.
 */
public class Singleton1 {

    private static Singleton1 instance;

    private Singleton1(){

    }

    public static Singleton1 getInstance() {
        if (instance == null) {
            instance = new Singleton1();
        }
        return instance;
    }

}
